 /* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

相关接口
API related to order

OpenAPI spec version: v2
Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/


#import <Foundation/Foundation.h>
#import <JDCloudOCSDKOrder/OrderModel.h>

@implementation ExtraInfo
-(id) initWithName:(NSString*) name
      value:(NSString*)value { 
     self.name = name;               
     self.value = value;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.value = [dictionary objectForKey:@"value"];
    return self;
}
 @end
@implementation ListOrderRequest
-(id) initWithAppCode:(NSString*) appCode
      chargeMode:(NSString*)chargeMode
      startTime:(NSNumber*)startTime
      endTime:(NSNumber*)endTime
      orderType:(NSString*)orderType
      pageNumber:(NSNumber*)pageNumber
      pageSize:(NSNumber*)pageSize
      payType:(NSString*)payType
      serviceCode:(NSString*)serviceCode
      status:(NSString*)status { 
     self.appCode = appCode;               
     self.chargeMode = chargeMode;               
     self.startTime = startTime;               
     self.endTime = endTime;               
     self.orderType = orderType;               
     self.pageNumber = pageNumber;               
     self.pageSize = pageSize;               
     self.payType = payType;               
     self.serviceCode = serviceCode;               
     self.status = status;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self appCode])
    {
        [result setValue:[self appCode] forKey:@"appCode"];
    }
    if([self chargeMode])
    {
        [result setValue:[self chargeMode] forKey:@"chargeMode"];
    }
    if([self startTime])
    {
        [result setValue:[self startTime] forKey:@"startTime"];
    }
    if([self endTime])
    {
        [result setValue:[self endTime] forKey:@"endTime"];
    }
    if([self orderType])
    {
        [result setValue:[self orderType] forKey:@"orderType"];
    }
    if([self pageNumber])
    {
        [result setValue:[self pageNumber] forKey:@"pageNumber"];
    }
    if([self pageSize])
    {
        [result setValue:[self pageSize] forKey:@"pageSize"];
    }
    if([self payType])
    {
        [result setValue:[self payType] forKey:@"payType"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.appCode = [dictionary objectForKey:@"appCode"];
    self.chargeMode = [dictionary objectForKey:@"chargeMode"];
    self.startTime = [dictionary objectForKey:@"startTime"];
    self.endTime = [dictionary objectForKey:@"endTime"];
    self.orderType = [dictionary objectForKey:@"orderType"];
    self.pageNumber = [dictionary objectForKey:@"pageNumber"];
    self.pageSize = [dictionary objectForKey:@"pageSize"];
    self.payType = [dictionary objectForKey:@"payType"];
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    self.status = [dictionary objectForKey:@"status"];
    return self;
}
 @end
@implementation OrderResponseObject
-(id) initWithActualFee:(NSNumber*) actualFee
      appCode:(NSString*)appCode
      appName:(NSString*)appName
      chargeMode:(NSString*)chargeMode
      createTime:(NSString*)createTime
      discountFee:(NSNumber*)discountFee
      orderNumber:(NSString*)orderNumber
      orderType:(NSString*)orderType
      payTime:(NSString*)payTime
      payType:(NSString*)payType
      paymentNumber:(NSString*)paymentNumber
      pin:(NSString*)pin
      selfSupportType:(NSString*)selfSupportType
      serviceName:(NSString*)serviceName
      status:(NSString*)status
      totalFee:(NSNumber*)totalFee { 
     self.actualFee = actualFee;               
     self.appCode = appCode;               
     self.appName = appName;               
     self.chargeMode = chargeMode;               
     self.createTime = createTime;               
     self.discountFee = discountFee;               
     self.orderNumber = orderNumber;               
     self.orderType = orderType;               
     self.payTime = payTime;               
     self.payType = payType;               
     self.paymentNumber = paymentNumber;               
     self.pin = pin;               
     self.selfSupportType = selfSupportType;               
     self.serviceName = serviceName;               
     self.status = status;               
     self.totalFee = totalFee;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self actualFee])
    {
        [result setValue:[self actualFee] forKey:@"actualFee"];
    }
    if([self appCode])
    {
        [result setValue:[self appCode] forKey:@"appCode"];
    }
    if([self appName])
    {
        [result setValue:[self appName] forKey:@"appName"];
    }
    if([self chargeMode])
    {
        [result setValue:[self chargeMode] forKey:@"chargeMode"];
    }
    if([self createTime])
    {
        [result setValue:[self createTime] forKey:@"createTime"];
    }
    if([self discountFee])
    {
        [result setValue:[self discountFee] forKey:@"discountFee"];
    }
    if([self orderNumber])
    {
        [result setValue:[self orderNumber] forKey:@"orderNumber"];
    }
    if([self orderType])
    {
        [result setValue:[self orderType] forKey:@"orderType"];
    }
    if([self payTime])
    {
        [result setValue:[self payTime] forKey:@"payTime"];
    }
    if([self payType])
    {
        [result setValue:[self payType] forKey:@"payType"];
    }
    if([self paymentNumber])
    {
        [result setValue:[self paymentNumber] forKey:@"paymentNumber"];
    }
    if([self pin])
    {
        [result setValue:[self pin] forKey:@"pin"];
    }
    if([self selfSupportType])
    {
        [result setValue:[self selfSupportType] forKey:@"selfSupportType"];
    }
    if([self serviceName])
    {
        [result setValue:[self serviceName] forKey:@"serviceName"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self totalFee])
    {
        [result setValue:[self totalFee] forKey:@"totalFee"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.actualFee = [dictionary objectForKey:@"actualFee"];
    self.appCode = [dictionary objectForKey:@"appCode"];
    self.appName = [dictionary objectForKey:@"appName"];
    self.chargeMode = [dictionary objectForKey:@"chargeMode"];
    self.createTime = [dictionary objectForKey:@"createTime"];
    self.discountFee = [dictionary objectForKey:@"discountFee"];
    self.orderNumber = [dictionary objectForKey:@"orderNumber"];
    self.orderType = [dictionary objectForKey:@"orderType"];
    self.payTime = [dictionary objectForKey:@"payTime"];
    self.payType = [dictionary objectForKey:@"payType"];
    self.paymentNumber = [dictionary objectForKey:@"paymentNumber"];
    self.pin = [dictionary objectForKey:@"pin"];
    self.selfSupportType = [dictionary objectForKey:@"selfSupportType"];
    self.serviceName = [dictionary objectForKey:@"serviceName"];
    self.status = [dictionary objectForKey:@"status"];
    self.totalFee = [dictionary objectForKey:@"totalFee"];
    return self;
}
 @end
@implementation OrderResourceInfo
-(id) initWithOrderNumber:(NSString*) orderNumber
      pin:(NSString*)pin
      resourceId:(NSString*)resourceId
      sourceId:(NSString*)sourceId { 
     self.orderNumber = orderNumber;               
     self.pin = pin;               
     self.resourceId = resourceId;               
     self.sourceId = sourceId;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self orderNumber])
    {
        [result setValue:[self orderNumber] forKey:@"orderNumber"];
    }
    if([self pin])
    {
        [result setValue:[self pin] forKey:@"pin"];
    }
    if([self resourceId])
    {
        [result setValue:[self resourceId] forKey:@"resourceId"];
    }
    if([self sourceId])
    {
        [result setValue:[self sourceId] forKey:@"sourceId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.orderNumber = [dictionary objectForKey:@"orderNumber"];
    self.pin = [dictionary objectForKey:@"pin"];
    self.resourceId = [dictionary objectForKey:@"resourceId"];
    self.sourceId = [dictionary objectForKey:@"sourceId"];
    return self;
}
 @end
@implementation OrderItemDetailResponseObject
-(id) initWithTotalFee:(NSNumber*) totalFee
      actualFee:(NSNumber*)actualFee
      balancePay:(NSNumber*)balancePay
      chargeDuration:(NSNumber*)chargeDuration
      moneyPay:(NSNumber*)moneyPay
      refundFee:(NSNumber*)refundFee
      chargeMode:(NSString*)chargeMode
      createTime:(NSString*)createTime
      expireDateAfter:(NSString*)expireDateAfter
      expireDateBefore:(NSString*)expireDateBefore
      extraInfo:(NSArray<ExtraInfo*>*)extraInfo
      extraInfoAfter:(NSArray<ExtraInfo*>*)extraInfoAfter
      extraInfoBefore:(NSArray<ExtraInfo*>*)extraInfoBefore
      favorableFee:(NSNumber*)favorableFee
      formula:(NSString*)formula
      itemId:(NSString*)itemId
      itemName:(NSString*)itemName
      orderNumber:(NSString*)orderNumber
      priceSnapshot:(NSString*)priceSnapshot
      quantity:(NSNumber*)quantity
      remark:(NSString*)remark
      resizeFormulaType:(NSString*)resizeFormulaType
      serviceName:(NSString*)serviceName
      siteType:(NSString*)siteType
      status:(NSString*)status
      unit:(NSString*)unit
      orderItemDetailResponse:(NSArray<OrderItemDetailResponseObject*>*)orderItemDetailResponse { 
     self.totalFee = totalFee;               
     self.actualFee = actualFee;               
     self.balancePay = balancePay;               
     self.chargeDuration = chargeDuration;               
     self.moneyPay = moneyPay;               
     self.refundFee = refundFee;               
     self.chargeMode = chargeMode;               
     self.createTime = createTime;               
     self.expireDateAfter = expireDateAfter;               
     self.expireDateBefore = expireDateBefore;               
     self.extraInfo = extraInfo;               
     self.extraInfoAfter = extraInfoAfter;               
     self.extraInfoBefore = extraInfoBefore;               
     self.favorableFee = favorableFee;               
     self.formula = formula;               
     self.itemId = itemId;               
     self.itemName = itemName;               
     self.orderNumber = orderNumber;               
     self.priceSnapshot = priceSnapshot;               
     self.quantity = quantity;               
     self.remark = remark;               
     self.resizeFormulaType = resizeFormulaType;               
     self.serviceName = serviceName;               
     self.siteType = siteType;               
     self.status = status;               
     self.unit = unit;               
     self.orderItemDetailResponse = orderItemDetailResponse;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self totalFee])
    {
        [result setValue:[self totalFee] forKey:@"totalFee"];
    }
    if([self actualFee])
    {
        [result setValue:[self actualFee] forKey:@"actualFee"];
    }
    if([self balancePay])
    {
        [result setValue:[self balancePay] forKey:@"balancePay"];
    }
    if([self chargeDuration])
    {
        [result setValue:[self chargeDuration] forKey:@"chargeDuration"];
    }
    if([self moneyPay])
    {
        [result setValue:[self moneyPay] forKey:@"moneyPay"];
    }
    if([self refundFee])
    {
        [result setValue:[self refundFee] forKey:@"refundFee"];
    }
    if([self chargeMode])
    {
        [result setValue:[self chargeMode] forKey:@"chargeMode"];
    }
    if([self createTime])
    {
        [result setValue:[self createTime] forKey:@"createTime"];
    }
    if([self expireDateAfter])
    {
        [result setValue:[self expireDateAfter] forKey:@"expireDateAfter"];
    }
    if([self expireDateBefore])
    {
        [result setValue:[self expireDateBefore] forKey:@"expireDateBefore"];
    }
    if([self extraInfo])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self extraInfo] count]; i++) {
            ExtraInfo* item = [[self extraInfo] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"extraInfo"];
    }
    if([self extraInfoAfter])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self extraInfoAfter] count]; i++) {
            ExtraInfo* item = [[self extraInfoAfter] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"extraInfoAfter"];
    }
    if([self extraInfoBefore])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self extraInfoBefore] count]; i++) {
            ExtraInfo* item = [[self extraInfoBefore] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"extraInfoBefore"];
    }
    if([self favorableFee])
    {
        [result setValue:[self favorableFee] forKey:@"favorableFee"];
    }
    if([self formula])
    {
        [result setValue:[self formula] forKey:@"formula"];
    }
    if([self itemId])
    {
        [result setValue:[self itemId] forKey:@"itemId"];
    }
    if([self itemName])
    {
        [result setValue:[self itemName] forKey:@"itemName"];
    }
    if([self orderNumber])
    {
        [result setValue:[self orderNumber] forKey:@"orderNumber"];
    }
    if([self priceSnapshot])
    {
        [result setValue:[self priceSnapshot] forKey:@"priceSnapshot"];
    }
    if([self quantity])
    {
        [result setValue:[self quantity] forKey:@"quantity"];
    }
    if([self remark])
    {
        [result setValue:[self remark] forKey:@"remark"];
    }
    if([self resizeFormulaType])
    {
        [result setValue:[self resizeFormulaType] forKey:@"resizeFormulaType"];
    }
    if([self serviceName])
    {
        [result setValue:[self serviceName] forKey:@"serviceName"];
    }
    if([self siteType])
    {
        [result setValue:[self siteType] forKey:@"siteType"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self unit])
    {
        [result setValue:[self unit] forKey:@"unit"];
    }
    if([self orderItemDetailResponse])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self orderItemDetailResponse] count]; i++) {
            OrderItemDetailResponseObject* item = [[self orderItemDetailResponse] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"orderItemDetailResponse"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.totalFee = [dictionary objectForKey:@"totalFee"];
    self.actualFee = [dictionary objectForKey:@"actualFee"];
    self.balancePay = [dictionary objectForKey:@"balancePay"];
    self.chargeDuration = [dictionary objectForKey:@"chargeDuration"];
    self.moneyPay = [dictionary objectForKey:@"moneyPay"];
    self.refundFee = [dictionary objectForKey:@"refundFee"];
    self.chargeMode = [dictionary objectForKey:@"chargeMode"];
    self.createTime = [dictionary objectForKey:@"createTime"];
    self.expireDateAfter = [dictionary objectForKey:@"expireDateAfter"];
    self.expireDateBefore = [dictionary objectForKey:@"expireDateBefore"];
    NSArray* extraInfoArray = [dictionary objectForKey:@"extraInfo"];
    if(extraInfoArray&&![extraInfoArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [extraInfoArray count];i++)
        {
            ExtraInfo* item = [[ExtraInfo alloc]initWithDic:[extraInfoArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.extraInfo = propertyArray;
    }
    NSArray* extraInfoAfterArray = [dictionary objectForKey:@"extraInfoAfter"];
    if(extraInfoAfterArray&&![extraInfoAfterArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [extraInfoAfterArray count];i++)
        {
            ExtraInfo* item = [[ExtraInfo alloc]initWithDic:[extraInfoAfterArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.extraInfoAfter = propertyArray;
    }
    NSArray* extraInfoBeforeArray = [dictionary objectForKey:@"extraInfoBefore"];
    if(extraInfoBeforeArray&&![extraInfoBeforeArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [extraInfoBeforeArray count];i++)
        {
            ExtraInfo* item = [[ExtraInfo alloc]initWithDic:[extraInfoBeforeArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.extraInfoBefore = propertyArray;
    }
    self.favorableFee = [dictionary objectForKey:@"favorableFee"];
    self.formula = [dictionary objectForKey:@"formula"];
    self.itemId = [dictionary objectForKey:@"itemId"];
    self.itemName = [dictionary objectForKey:@"itemName"];
    self.orderNumber = [dictionary objectForKey:@"orderNumber"];
    self.priceSnapshot = [dictionary objectForKey:@"priceSnapshot"];
    self.quantity = [dictionary objectForKey:@"quantity"];
    self.remark = [dictionary objectForKey:@"remark"];
    self.resizeFormulaType = [dictionary objectForKey:@"resizeFormulaType"];
    self.serviceName = [dictionary objectForKey:@"serviceName"];
    self.siteType = [dictionary objectForKey:@"siteType"];
    self.status = [dictionary objectForKey:@"status"];
    self.unit = [dictionary objectForKey:@"unit"];
    NSArray* orderItemDetailResponseArray = [dictionary objectForKey:@"orderItemDetailResponse"];
    if(orderItemDetailResponseArray&&![orderItemDetailResponseArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [orderItemDetailResponseArray count];i++)
        {
            OrderItemDetailResponseObject* item = [[OrderItemDetailResponseObject alloc]initWithDic:[orderItemDetailResponseArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.orderItemDetailResponse = propertyArray;
    }
    return self;
}
 @end
@implementation CreateOrderRequestObject
-(id) initWithAppCode:(NSString*) appCode
      az:(NSString*)az
      chargeDuration:(NSNumber*)chargeDuration
      chargeMode:(NSString*)chargeMode
      chargeUnit:(NSString*)chargeUnit
      customInfo:(NSString*)customInfo
      extraInfo:(NSArray<ExtraInfo*>*)extraInfo
      formula:(NSString*)formula
      itemName:(NSString*)itemName
      itemType:(NSString*)itemType
      orderType:(NSString*)orderType
      payType:(NSString*)payType
      pin:(NSString*)pin
      promotionInfo:(NSString*)promotionInfo
      quantity:(NSNumber*)quantity
      region:(NSString*)region
      resourceId:(NSString*)resourceId
      returnUrl:(NSString*)returnUrl
      salesAttribute:(NSString*)salesAttribute
      serviceCode:(NSString*)serviceCode
      serviceProviderName:(NSString*)serviceProviderName
      serviceProviderPin:(NSString*)serviceProviderPin
      siteType:(NSString*)siteType
      sourceId:(NSString*)sourceId
      taskId:(NSString*)taskId { 
     self.appCode = appCode;               
     self.az = az;               
     self.chargeDuration = chargeDuration;               
     self.chargeMode = chargeMode;               
     self.chargeUnit = chargeUnit;               
     self.customInfo = customInfo;               
     self.extraInfo = extraInfo;               
     self.formula = formula;               
     self.itemName = itemName;               
     self.itemType = itemType;               
     self.orderType = orderType;               
     self.payType = payType;               
     self.pin = pin;               
     self.promotionInfo = promotionInfo;               
     self.quantity = quantity;               
     self.region = region;               
     self.resourceId = resourceId;               
     self.returnUrl = returnUrl;               
     self.salesAttribute = salesAttribute;               
     self.serviceCode = serviceCode;               
     self.serviceProviderName = serviceProviderName;               
     self.serviceProviderPin = serviceProviderPin;               
     self.siteType = siteType;               
     self.sourceId = sourceId;               
     self.taskId = taskId;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self appCode])
    {
        [result setValue:[self appCode] forKey:@"appCode"];
    }
    if([self az])
    {
        [result setValue:[self az] forKey:@"az"];
    }
    if([self chargeDuration])
    {
        [result setValue:[self chargeDuration] forKey:@"chargeDuration"];
    }
    if([self chargeMode])
    {
        [result setValue:[self chargeMode] forKey:@"chargeMode"];
    }
    if([self chargeUnit])
    {
        [result setValue:[self chargeUnit] forKey:@"chargeUnit"];
    }
    if([self customInfo])
    {
        [result setValue:[self customInfo] forKey:@"customInfo"];
    }
    if([self extraInfo])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self extraInfo] count]; i++) {
            ExtraInfo* item = [[self extraInfo] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"extraInfo"];
    }
    if([self formula])
    {
        [result setValue:[self formula] forKey:@"formula"];
    }
    if([self itemName])
    {
        [result setValue:[self itemName] forKey:@"itemName"];
    }
    if([self itemType])
    {
        [result setValue:[self itemType] forKey:@"itemType"];
    }
    if([self orderType])
    {
        [result setValue:[self orderType] forKey:@"orderType"];
    }
    if([self payType])
    {
        [result setValue:[self payType] forKey:@"payType"];
    }
    if([self pin])
    {
        [result setValue:[self pin] forKey:@"pin"];
    }
    if([self promotionInfo])
    {
        [result setValue:[self promotionInfo] forKey:@"promotionInfo"];
    }
    if([self quantity])
    {
        [result setValue:[self quantity] forKey:@"quantity"];
    }
    if([self region])
    {
        [result setValue:[self region] forKey:@"region"];
    }
    if([self resourceId])
    {
        [result setValue:[self resourceId] forKey:@"resourceId"];
    }
    if([self returnUrl])
    {
        [result setValue:[self returnUrl] forKey:@"returnUrl"];
    }
    if([self salesAttribute])
    {
        [result setValue:[self salesAttribute] forKey:@"salesAttribute"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    if([self serviceProviderName])
    {
        [result setValue:[self serviceProviderName] forKey:@"serviceProviderName"];
    }
    if([self serviceProviderPin])
    {
        [result setValue:[self serviceProviderPin] forKey:@"serviceProviderPin"];
    }
    if([self siteType])
    {
        [result setValue:[self siteType] forKey:@"siteType"];
    }
    if([self sourceId])
    {
        [result setValue:[self sourceId] forKey:@"sourceId"];
    }
    if([self taskId])
    {
        [result setValue:[self taskId] forKey:@"taskId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.appCode = [dictionary objectForKey:@"appCode"];
    self.az = [dictionary objectForKey:@"az"];
    self.chargeDuration = [dictionary objectForKey:@"chargeDuration"];
    self.chargeMode = [dictionary objectForKey:@"chargeMode"];
    self.chargeUnit = [dictionary objectForKey:@"chargeUnit"];
    self.customInfo = [dictionary objectForKey:@"customInfo"];
    NSArray* extraInfoArray = [dictionary objectForKey:@"extraInfo"];
    if(extraInfoArray&&![extraInfoArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [extraInfoArray count];i++)
        {
            ExtraInfo* item = [[ExtraInfo alloc]initWithDic:[extraInfoArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.extraInfo = propertyArray;
    }
    self.formula = [dictionary objectForKey:@"formula"];
    self.itemName = [dictionary objectForKey:@"itemName"];
    self.itemType = [dictionary objectForKey:@"itemType"];
    self.orderType = [dictionary objectForKey:@"orderType"];
    self.payType = [dictionary objectForKey:@"payType"];
    self.pin = [dictionary objectForKey:@"pin"];
    self.promotionInfo = [dictionary objectForKey:@"promotionInfo"];
    self.quantity = [dictionary objectForKey:@"quantity"];
    self.region = [dictionary objectForKey:@"region"];
    self.resourceId = [dictionary objectForKey:@"resourceId"];
    self.returnUrl = [dictionary objectForKey:@"returnUrl"];
    self.salesAttribute = [dictionary objectForKey:@"salesAttribute"];
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    self.serviceProviderName = [dictionary objectForKey:@"serviceProviderName"];
    self.serviceProviderPin = [dictionary objectForKey:@"serviceProviderPin"];
    self.siteType = [dictionary objectForKey:@"siteType"];
    self.sourceId = [dictionary objectForKey:@"sourceId"];
    self.taskId = [dictionary objectForKey:@"taskId"];
    return self;
}
 @end
@implementation CreateOrderRequestList
-(id) initWithCreateOrderRequests:(NSArray<CreateOrderRequestObject*>*) createOrderRequests { 
     self.createOrderRequests = createOrderRequests;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self createOrderRequests])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self createOrderRequests] count]; i++) {
            CreateOrderRequestObject* item = [[self createOrderRequests] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"createOrderRequests"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* createOrderRequestsArray = [dictionary objectForKey:@"createOrderRequests"];
    if(createOrderRequestsArray&&![createOrderRequestsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [createOrderRequestsArray count];i++)
        {
            CreateOrderRequestObject* item = [[CreateOrderRequestObject alloc]initWithDic:[createOrderRequestsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.createOrderRequests = propertyArray;
    }
    return self;
}
 @end
@implementation CreateOrderResponseObject
-(id) initWithMessage:(NSString*) message
      orderNumber:(NSString*)orderNumber
      actualFee:(NSNumber*)actualFee
      success:(NSNumber*)success
      orderResourceInfoList:(NSArray<OrderResourceInfo*>*)orderResourceInfoList { 
     self.message = message;               
     self.orderNumber = orderNumber;               
     self.actualFee = actualFee;               
     self.success = success;               
     self.orderResourceInfoList = orderResourceInfoList;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self message])
    {
        [result setValue:[self message] forKey:@"message"];
    }
    if([self orderNumber])
    {
        [result setValue:[self orderNumber] forKey:@"orderNumber"];
    }
    if([self actualFee])
    {
        [result setValue:[self actualFee] forKey:@"actualFee"];
    }
    if([self success])
    {
        [result setValue:[self success] forKey:@"success"];
    }
    if([self orderResourceInfoList])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self orderResourceInfoList] count]; i++) {
            OrderResourceInfo* item = [[self orderResourceInfoList] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"orderResourceInfoList"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.message = [dictionary objectForKey:@"message"];
    self.orderNumber = [dictionary objectForKey:@"orderNumber"];
    self.actualFee = [dictionary objectForKey:@"actualFee"];
    self.success = [dictionary objectForKey:@"success"];
    NSArray* orderResourceInfoListArray = [dictionary objectForKey:@"orderResourceInfoList"];
    if(orderResourceInfoListArray&&![orderResourceInfoListArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [orderResourceInfoListArray count];i++)
        {
            OrderResourceInfo* item = [[OrderResourceInfo alloc]initWithDic:[orderResourceInfoListArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.orderResourceInfoList = propertyArray;
    }
    return self;
}
 @end
@implementation OrderDetailResponseObject
-(id) initWithAppCode:(NSString*) appCode
      appName:(NSString*)appName
      balancePay:(NSNumber*)balancePay
      discountFee:(NSNumber*)discountFee
      refundFee:(NSNumber*)refundFee
      favorableFee:(NSNumber*)favorableFee
      totalFee:(NSNumber*)totalFee
      moneyPay:(NSNumber*)moneyPay
      actualFee:(NSNumber*)actualFee
      paidFee:(NSNumber*)paidFee
      activityType:(NSString*)activityType
      chargeMode:(NSString*)chargeMode
      createTime:(NSString*)createTime
      expirationTime:(NSString*)expirationTime
      orderNumber:(NSString*)orderNumber
      orderType:(NSString*)orderType
      payTime:(NSString*)payTime
      payType:(NSString*)payType
      payUrl:(NSString*)payUrl
      payer:(NSString*)payer
      paymentChannel:(NSString*)paymentChannel
      paymentNumber:(NSString*)paymentNumber
      pin:(NSString*)pin
      proposer:(NSString*)proposer
      remark:(NSString*)remark
      selfSupportType:(NSString*)selfSupportType
      serviceName:(NSString*)serviceName
      siteType:(NSString*)siteType
      status:(NSString*)status
      updatedTime:(NSString*)updatedTime
      childOrderDetailList:(NSArray<OrderDetailResponseObject*>*)childOrderDetailList
      orderItemDetails:(NSArray<OrderItemDetailResponseObject*>*)orderItemDetails { 
     self.appCode = appCode;               
     self.appName = appName;               
     self.balancePay = balancePay;               
     self.discountFee = discountFee;               
     self.refundFee = refundFee;               
     self.favorableFee = favorableFee;               
     self.totalFee = totalFee;               
     self.moneyPay = moneyPay;               
     self.actualFee = actualFee;               
     self.paidFee = paidFee;               
     self.activityType = activityType;               
     self.chargeMode = chargeMode;               
     self.createTime = createTime;               
     self.expirationTime = expirationTime;               
     self.orderNumber = orderNumber;               
     self.orderType = orderType;               
     self.payTime = payTime;               
     self.payType = payType;               
     self.payUrl = payUrl;               
     self.payer = payer;               
     self.paymentChannel = paymentChannel;               
     self.paymentNumber = paymentNumber;               
     self.pin = pin;               
     self.proposer = proposer;               
     self.remark = remark;               
     self.selfSupportType = selfSupportType;               
     self.serviceName = serviceName;               
     self.siteType = siteType;               
     self.status = status;               
     self.updatedTime = updatedTime;               
     self.childOrderDetailList = childOrderDetailList;               
     self.orderItemDetails = orderItemDetails;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self appCode])
    {
        [result setValue:[self appCode] forKey:@"appCode"];
    }
    if([self appName])
    {
        [result setValue:[self appName] forKey:@"appName"];
    }
    if([self balancePay])
    {
        [result setValue:[self balancePay] forKey:@"balancePay"];
    }
    if([self discountFee])
    {
        [result setValue:[self discountFee] forKey:@"discountFee"];
    }
    if([self refundFee])
    {
        [result setValue:[self refundFee] forKey:@"refundFee"];
    }
    if([self favorableFee])
    {
        [result setValue:[self favorableFee] forKey:@"favorableFee"];
    }
    if([self totalFee])
    {
        [result setValue:[self totalFee] forKey:@"totalFee"];
    }
    if([self moneyPay])
    {
        [result setValue:[self moneyPay] forKey:@"moneyPay"];
    }
    if([self actualFee])
    {
        [result setValue:[self actualFee] forKey:@"actualFee"];
    }
    if([self paidFee])
    {
        [result setValue:[self paidFee] forKey:@"paidFee"];
    }
    if([self activityType])
    {
        [result setValue:[self activityType] forKey:@"activityType"];
    }
    if([self chargeMode])
    {
        [result setValue:[self chargeMode] forKey:@"chargeMode"];
    }
    if([self createTime])
    {
        [result setValue:[self createTime] forKey:@"createTime"];
    }
    if([self expirationTime])
    {
        [result setValue:[self expirationTime] forKey:@"expirationTime"];
    }
    if([self orderNumber])
    {
        [result setValue:[self orderNumber] forKey:@"orderNumber"];
    }
    if([self orderType])
    {
        [result setValue:[self orderType] forKey:@"orderType"];
    }
    if([self payTime])
    {
        [result setValue:[self payTime] forKey:@"payTime"];
    }
    if([self payType])
    {
        [result setValue:[self payType] forKey:@"payType"];
    }
    if([self payUrl])
    {
        [result setValue:[self payUrl] forKey:@"payUrl"];
    }
    if([self payer])
    {
        [result setValue:[self payer] forKey:@"payer"];
    }
    if([self paymentChannel])
    {
        [result setValue:[self paymentChannel] forKey:@"paymentChannel"];
    }
    if([self paymentNumber])
    {
        [result setValue:[self paymentNumber] forKey:@"paymentNumber"];
    }
    if([self pin])
    {
        [result setValue:[self pin] forKey:@"pin"];
    }
    if([self proposer])
    {
        [result setValue:[self proposer] forKey:@"proposer"];
    }
    if([self remark])
    {
        [result setValue:[self remark] forKey:@"remark"];
    }
    if([self selfSupportType])
    {
        [result setValue:[self selfSupportType] forKey:@"selfSupportType"];
    }
    if([self serviceName])
    {
        [result setValue:[self serviceName] forKey:@"serviceName"];
    }
    if([self siteType])
    {
        [result setValue:[self siteType] forKey:@"siteType"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self updatedTime])
    {
        [result setValue:[self updatedTime] forKey:@"updatedTime"];
    }
    if([self childOrderDetailList])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self childOrderDetailList] count]; i++) {
            OrderDetailResponseObject* item = [[self childOrderDetailList] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"childOrderDetailList"];
    }
    if([self orderItemDetails])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self orderItemDetails] count]; i++) {
            OrderItemDetailResponseObject* item = [[self orderItemDetails] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"orderItemDetails"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.appCode = [dictionary objectForKey:@"appCode"];
    self.appName = [dictionary objectForKey:@"appName"];
    self.balancePay = [dictionary objectForKey:@"balancePay"];
    self.discountFee = [dictionary objectForKey:@"discountFee"];
    self.refundFee = [dictionary objectForKey:@"refundFee"];
    self.favorableFee = [dictionary objectForKey:@"favorableFee"];
    self.totalFee = [dictionary objectForKey:@"totalFee"];
    self.moneyPay = [dictionary objectForKey:@"moneyPay"];
    self.actualFee = [dictionary objectForKey:@"actualFee"];
    self.paidFee = [dictionary objectForKey:@"paidFee"];
    self.activityType = [dictionary objectForKey:@"activityType"];
    self.chargeMode = [dictionary objectForKey:@"chargeMode"];
    self.createTime = [dictionary objectForKey:@"createTime"];
    self.expirationTime = [dictionary objectForKey:@"expirationTime"];
    self.orderNumber = [dictionary objectForKey:@"orderNumber"];
    self.orderType = [dictionary objectForKey:@"orderType"];
    self.payTime = [dictionary objectForKey:@"payTime"];
    self.payType = [dictionary objectForKey:@"payType"];
    self.payUrl = [dictionary objectForKey:@"payUrl"];
    self.payer = [dictionary objectForKey:@"payer"];
    self.paymentChannel = [dictionary objectForKey:@"paymentChannel"];
    self.paymentNumber = [dictionary objectForKey:@"paymentNumber"];
    self.pin = [dictionary objectForKey:@"pin"];
    self.proposer = [dictionary objectForKey:@"proposer"];
    self.remark = [dictionary objectForKey:@"remark"];
    self.selfSupportType = [dictionary objectForKey:@"selfSupportType"];
    self.serviceName = [dictionary objectForKey:@"serviceName"];
    self.siteType = [dictionary objectForKey:@"siteType"];
    self.status = [dictionary objectForKey:@"status"];
    self.updatedTime = [dictionary objectForKey:@"updatedTime"];
    NSArray* childOrderDetailListArray = [dictionary objectForKey:@"childOrderDetailList"];
    if(childOrderDetailListArray&&![childOrderDetailListArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [childOrderDetailListArray count];i++)
        {
            OrderDetailResponseObject* item = [[OrderDetailResponseObject alloc]initWithDic:[childOrderDetailListArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.childOrderDetailList = propertyArray;
    }
    NSArray* orderItemDetailsArray = [dictionary objectForKey:@"orderItemDetails"];
    if(orderItemDetailsArray&&![orderItemDetailsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [orderItemDetailsArray count];i++)
        {
            OrderItemDetailResponseObject* item = [[OrderItemDetailResponseObject alloc]initWithDic:[orderItemDetailsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.orderItemDetails = propertyArray;
    }
    return self;
}
 @end
 
 


